import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
// 样式初始化一般放在最前面
import 'reset-css'
// element plus
import ElementPlus from 'element-plus'
// element css
import 'element-plus/dist/index.css'
// element dark(内置暗黑模式)
import 'element-plus/theme-chalk/dark/css-vars.css'
// vue Router
import router from '@/router'
// vue i18n
import I18n from '@/languages/index'
// custom directives
import directives from '@/directives/index'
// 全局错误捕捉
import errorHandler from '@/utils/errorHandler'
// 消息订阅与发布
import '@/utils/mitt'
import '@/mock'

// import MyTest from '@/components/MyTest/MyTest.vue'

const app = createApp(App)
app.config.errorHandler = errorHandler
// app.component('MyTest', MyTest)
app.use(createPinia())

app.use(router).use(I18n).use(directives).use(ElementPlus).mount('#app')
